package com.youle.youleservice.util;

import android.content.Context;
import android.telephony.TelephonyManager;

/**
 * Created by Administrator on 2018/8/16.
 */

public class DeviceUtil {

    /**
     * 获取设备imei号
     *
     * @param context
     * @return
     */
    public static String getImei(Context context) {
        try {
            return ((TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE)).getDeviceId();
        }catch (Exception e){
            e.printStackTrace();
        }
        return "";
    }

}
